<template>
	<!-- 球馆 statr -->
	<view class="meadowlands">
		<view class="bg1">
			<view></view>
		</view>
		<view class="dian"></view>
		<uv-navbar :placeholder="true" bg-color="transparent" @leftClick="back">
			<image slot="left" src="https://www.guizhouqy.com/mini/back.png" style="width: 48rpx;height: 48rpx;"></image>
			<text slot="center" style="font-weight: bold;font-size: 32rpx;color: #FFFFFF;">账单</text>
		</uv-navbar>
		<!-- <view class="header">
			<image src="https://www.guizhouqy.com/mini/back.png" @click="back" mode=""></image>
			<text>账单</text>
			<image src="" mode=""></image>
		</view> -->
		<view class="box1">
			<view class="bill">
				<view class="item">
					<view class="name">当前余额</view>
					<view class="money">2345.98</view>
				</view>
				<view class="item">
					<view class="name">当前余额</view>
					<view class="money">2345.98</view>
				</view>
				<image src="https://www.guizhouqy.com/mini/bill.png" mode=""></image>
			</view>
		</view>
		<view class="box2">
			<view class="list">
				<view class="item" v-for="(item,index) in 10" :key="index">
					<view class="left">
						<view class="name">GT 台球室( 新印厂店)</view>
						<view class="time">2025-05-05 00:04:04</view>
					</view>
					<view class="right">+234.85</view>
				</view>
			</view>
		</view>
	</view>
	<!-- 球馆 end -->
</template>

<script>
	import {
		goLogin,
		checkLogin
	} from '@/libs/login';
	export default {
		data() {
			return {

			}
		},
		onShow() {
			let theme = uni.getStorageSync('theme')
			this.fontColor = theme.color
			this.themeBg = 'linear-gradient(90deg, ' + theme.bg1 + ', ' + theme.bg2 + ')'
			this.isLogin = this.$store.getters.isLogin

			if (this.isLogin) {
				this.getUserInfo()
				this.getUserBaseInfo()
			}
		},
		methods: {
			back() {
				uni.navigateBack({
					delta: 1
				});
			},
			navTo(url) {
				console.log("url", url)
				uni.navigateTo({
					url
				})
				return
				if (!this.isLogin) {
					goLogin();
				}


			},
		}
	}
</script>

<style scoped lang="scss">
	.meadowlands {
		background: #240F41;
		color: #FFFFFF;
		min-height: 100vh;
		position: relative;
		/* 添加相对定位，创建新的堆叠上下文 */

		.bg1 {
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: center;
			position: absolute;
			left: calc(50%-59px);

			view {
				width: 118px;
				height: 118px;
				background: linear-gradient(90deg, #C829F3 0%, #4516CA 100%);
				box-shadow: inset 0rpx 8rpx 8rpx 0rpx rgba(0, 0, 0, 0.25);
				border-radius: 0rpx 0rpx 0rpx 0rpx;
				opacity: 0.9;
				filter: blur(90px);
			}
		}

		.dian {
			width: 118px;
			height: 118px;
			background: linear-gradient(90deg, #1F87EF 0%, #1F87EF 100%);
			box-shadow: inset 0rpx 8rpx 8rpx 0rpx rgba(0, 0, 0, 0.25);
			border-radius: 0rpx 0rpx 0rpx 0rpx;
			opacity: 0.9;
			filter: blur(90px);
			position: absolute;
			left: 0;
			top: 20px;
			z-index: 1;
			/* 添加较低的z-index */
		}

		.header {
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			padding: 0 38rpx;
			padding-top: 30px;
			position: relative;
			/* 添加相对定位 */
			z-index: 10;
			/* 确保头部显示在其他内容之上 */

			image {
				width: 48rpx;
				height: 48rpx;
				z-index: 999;
			}
		}

		.box1 {
			padding: 0 56rpx;
			position: relative;
			/* 添加相对定位 */
			z-index: 2;
			/* 设置适当的z-index */

			.bill {
				width: 100%;
				height: 288rpx;
				background: linear-gradient(90deg, #C829F3 0%, #4516CA 100%);
				border-radius: 16rpx 16rpx 16rpx 16rpx;
				border: 2rpx solid #9A24B9;
				margin-top: 62rpx;
				position: relative;
				display: flex;
				flex-direction: row;
				justify-content: space-around;
				z-index: 2;
				/* 确保账单卡片有适当的层级 */

				.item {
					padding-top: 58rpx;

					.name {
						font-weight: 500;
						font-size: 28rpx;
						color: #FFFFFF;
					}

					.money {
						font-weight: 500;
						font-size: 48rpx;
						color: #FFFFFF;
						margin-top: 8rpx;
					}
				}

				image {
					position: absolute;
					right: 0;
					bottom: 0;
					width: 178rpx;
					height: 178rpx;
					z-index: 3;
					/* 确保图片显示在正确层级 */
				}
			}
		}

		.box2 {
			padding: 0 30rpx;
			margin-top: -40rpx;
			position: relative;
			/* 添加定位使z-index生效 */
			z-index: 5;
			/* 调整z-index值，确保在背景元素之上 */

			.list {
				width: 690rpx;
				background: #3C1262;
				border-radius: 16rpx 16rpx 16rpx 16rpx;
				border: 2rpx solid #9A24B9;

				.item {
					display: flex;
					flex-direction: row;
					align-items: center;
					justify-content: space-between;
					padding-bottom: 16rpx;
					padding-top: 34rpx;
					border-bottom: 1px solid #C829F3;

					.left {
						padding-left: 32rpx;

						.name {
							font-weight: 500;
							font-size: 24rpx;
							color: #FFFFFF;
						}

						.time {
							font-weight: 500;
							font-size: 24rpx;
							color: #999999;
							margin-top: 8rpx;
						}
					}

					.right {
						font-weight: 500;
						font-size: 28rpx;
						color: #FFFFFF;
						padding-right: 32rpx;
					}
				}
			}
		}
	}
</style>